-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MM-53118] Dynamically sized participants grid #805
Conversation
@@ -185,7 +185,7 @@ export function handleUserJoined(store: Store, ev: WebSocketMessage<UserJoinedDa | |||
} | |||
|
|||
if (ringingEnabled(store.getState()) && userID === currentUserID) { | |||
const callID = calls(store.getState())[channelID].ID || ''; | |||
const callID = calls(store.getState())[channelID]?.ID || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unrelated, but I spotted a crash, so I'm fixing it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'll assume the math checks out so I don't have to write it out myself. :P And I'll leave the UI/UX to Abhijit.
Thanks!
@@ -31,8 +39,52 @@ export type Props = { | |||
isSharingScreen?: boolean, | |||
} | |||
|
|||
const tileSizePropsMap = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice and clean, good idea.
@@ -60,54 +112,54 @@ export default function CallParticipant({ | |||
<> | |||
<div style={{position: 'relative'}}> | |||
<Avatar | |||
size={50} | |||
fontSize={18} | |||
size={tileSizePropsMap[size].avatarSize} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Total nit, but what if you added a const prop = tileSizePropsMap[size];
at the start? Would clean up the code a bit.
@streamer45 The screen cap looks great. Could you please put this on a test server? |
@abhijit-singh Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @streamer45! Looks like a huge improvement to me!
Just a couple of requests:
- If the username is displayed for a participant and it is long, it does not seem to be getting truncated properly. The full name does get truncated as expected even if it is long.

- Probably just a nice-to-have, but can we center align the new row of participants that's not fully populated. Here's screenshots to explain better -
Current: Left aligned bottom row (blank space on the right of participants)
Ideal: Center aligned bottom row (blank space on the left and right)
@abhijit-singh I fear that neither is going to be straightforward:
|
I'd be good with that. It is an edge case but how it renders currently clearly looks broken.
Not super confident if it adds value so I won't want you to spend too much time here. If it can be done without too much rework or breaking other things then that's awesome. Else we can choose to let it stay as is and review it again once we've used it for a bit. |
@abhijit-singh I haven't committed here yet but I updated the test server to see how it looks with flex. One side effect of that I notice is that now the grid items are not forced to be of equal height. It may also take a bit to ensure there's no funny breakage since we've been using grid for a long time. Let me know what you think, otherwise we can revert this bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now the grid items are not forced to be of equal height.
Looks to me like they're still of equal heights when I tested so I'm not sure of the impact.
And seems perfect to me now. We can go ahead with this from a UX perspective.
Maybe we can take help from someone in QA to do comprehensive testing on this if we fear things might break?
@abhijit-singh It's more noticeable when you hover as host. height.mp4
Yeah, we'll do some extra checking. |
@DHaussermann For this one, we'd like to check for any funny UX behaviour in the Calls pop-out based on the number of participants, their state, and different window sizes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and passed.
- Calls with several dozen participants uses horizontal space more efficiently
- Participant profile are show in wider rows that span further towards the right and left edges as expected
- Spot checked several odd and event participant counts raging form only a few up to over 60
- As participant list grows the width of the rows grow gradually and the size of the the profile images gradually shrinks as expected
- My test rig could not handle pushing the count up 75 - 100 but seems like the grid will scroll in the available horizontal resolution now rather than page.
- Tested in browser and desktop as a precauton
LGTM!
Summary
PR takes a first pass at implementing a dynamically sized call participants grid in the pop-out window view.
Specs
https://mattermost.atlassian.net/wiki/spaces/Calls/pages/2707193901/Calls+Participant+Grid
https://www.figma.com/design/8kcq0HRN2TUaVAdPeeSvsb/Calls-Participants-Grid?node-id=1-7&m=dev
Video
dynamic_grid.mp4
Ticket Link
https://mattermost.atlassian.net/browse/MM-53118